﻿package cn.smbms.dao.user;

import java.sql.Connection;
import java.util.List;

import cn.smbms.pojo.User;

public interface UserDao {
	// 增加用户信息
	public int add(Connection connection, User user) throws Exception;

	// 通过userCode获取User
	public User getLoginUser(Connection connection, String userCode)
			throws Exception;

	// 通过userName模糊查询
	public List<User> getUserList(Connection connection, String userName,int pageIndex,int pageSize)
			throws Exception;

	// 通过userId删除user
	public boolean deleteUserById(Connection connection, Integer delId)
			throws Exception;

	// 通过userId获取user
	public User getUserById(Connection connection, String id) throws Exception;

	// 修改用户信息
	public boolean modify(Connection connection, User user) throws Exception;

	// 修改当前用户密码
	public boolean updatePwd(Connection connection, int id, String pwd)
			throws Exception;

	// 查询总数量
	public int getCounts(String userName,Connection connection) throws Exception;

}
